Skip to content

Conversation

@frivoal
Copy link
Collaborator

@frivoal frivoal commented Oct 27, 2025

[foo,]* and foo#? are not equivalent, as the former has a trailing comma.

See #13001

[foo,]* and foo#? are not equivalent, as the former has a trailing
comma.

See w3c#13001
@frivoal frivoal merged commit 3a2ac8d into w3c:main Oct 27, 2025
1 check passed
@frivoal frivoal deleted the cursor-syntax branch October 27, 2025 07:25
keithamus added a commit to csskit/csskit that referenced this pull request Oct 27, 2025
w3c/csswg-drafts#13018 changed the syntax of Cursor from using `#?` to `,]*`. This subtle change
means trailing commas are always required. We didn't support this for a couple of reasons:

- Punct wasn't being rendered correctly due to quoting of the char, so `T![,]` was rendering as `T![',']` which isn't a
	known macro. css_parse could have included quoted variants of all characters, or we could have updated
	csskit_proc_macro to unquote the chars, which is what this change does.

- `T![,]` wasn't Visitable, meaning the `Vec<'a, (X, T![,])>` wasn't Visitable either. Both `Vec` & `(A, B)` _are_
	visitable, so it's only `T![,]` that needs to be to make the whole thing work. This change makes `T![,]` Visitable.
keithamus added a commit to csskit/csskit that referenced this pull request Oct 27, 2025
w3c/csswg-drafts#13018 changed the syntax of
Cursor from using `#?` to `,]*`. This subtle change
means trailing commas are always required. We didn't support this for a
couple of reasons:

- Punct wasn't being rendered correctly due to quoting of the char, so
`T![,]` was rendering as `T![',']` which isn't a
known macro. css_parse could have included quoted variants of all
characters, or we could have updated
	csskit_proc_macro to unquote the chars, which is what this change does.

- `T![,]` wasn't Visitable, meaning the `Vec<'a, (X, T![,])>` wasn't
Visitable either. Both `Vec` & `(A, B)` _are_
visitable, so it's only `T![,]` that needs to be to make the whole thing
work. This change makes `T![,]` Visitable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant